This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Oct 19, 2011, 8:57 PM
8 Posts

sessionAsSigner & sessionAsSignerWithFullAccess in Java

  • Category: Managed Beans in NSF
  • Platform: Windows
  • Release: 8.5.2
  • Role: Developer
  • Tags: Managed Beans,Java,security
  • Replies: 5
How can I get the sessionAsSigner & sessionAsSignerWithFullAccess in  java. I need to get more access than the logged in user to perform some action. I tried the following which doesn't seem to work.
 
FacesContext.getCurrentInstance();
        return context.getApplication().getVariableResolver().resolveVariable(
                context, "sessionAsSignerWithFullAccess");
 
I can see a java class for Session, but I don't see a java class equivalent to SessionAsSigner or SessionAsSignerWithFullAccess.
 
Please advise.
Oct 20, 2011, 5:22 AM
149 Posts
Re: sessionAsSigner & sessionAsSignerWithFullAccess in Java
 
try this
 
1. do your sessionassigner code in a button in server side javascript
2. check the generated java code in project explorer.
 
 
Good Luck
Thomas
Oct 20, 2011, 10:43 AM
135 Posts
Re: sessionAsSigner & sessionAsSignerWithFullAccess in Java
Can't you just pass them from SSJS?
Oct 20, 2011, 4:23 PM
8 Posts
Re: sessionAsSigner & sessionAsSignerWithFullAccess in Java
That is the first thing I did. I added the code in a button in SSJS and viewed the .java file. But it just evaluates whatever SSJS was written in the button.
 
I don't think we can pass the session from SSJS to Java. We need to get the global object using variable resolver. But it doesn't seem to work.
Oct 20, 2011, 5:48 PM
135 Posts
Re: sessionAsSigner & sessionAsSignerWithFullAccess in Java
What do you get with variableResolver, a session with user's access?
 
There is also the DominoUtils class which has 3 different methods for getting session, I'm not sure what's the difference between them:
 
http://www.timtripcony.com/xpages_ext_api_javadoc/com/ibm/xsp/model/domino/DominoUtils.html 
 
I'm always passing the session to my Java classes to make them reusable from agents, web services and servlets.
Oct 21, 2011, 2:21 PM
8 Posts
Re: sessionAsSigner & sessionAsSignerWithFullAccess in Java
FacesContext context=FacesContext.getCurrentInstance();
        return context.getApplication().getVariableResolver().resolveVariable(
                context, "sessionAsSignerWithFullAccess");
 
Actually this code works. I don't know why it is not working in one of my other applications.

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal